package com.todod.base.module.infra.controller.admin.baseofficialletter.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.mzt.logapi.starter.annotation.DiffLogField;
import com.todod.base.module.infra.dal.dataobject.baseofficialletter.BaseOfficialLetterDetailDO;
import com.todod.base.module.infra.dal.dataobject.baseofficialletter.BaseOfficialLetterFileDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDate;
import java.util.*;
import jakarta.validation.constraints.*;

@Schema(description = "管理后台 - 公函新增/修改 Request VO")
@Data
public class BaseOfficialLetterSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "19109")
    private Long id;

    @Schema(description = "主题", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "主题不能为空")
    @DiffLogField(name = "主题")
    private String theme;

    @Schema(description = "发起部门", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "发起部门不能为空")
    private Long deptId;

    @Schema(description = "开课日期")
    @DiffLogField(name = "有效开始日期")
    private LocalDate startDate;

    @Schema(description = "结束日期")
    @DiffLogField(name = "有效开始日期")
    private LocalDate endDate;

    @Schema(description = "附件(97:有/98:无)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "附件(97:有/98:无)不能为空")
    private Integer fileExists;

    @Schema(description = "内容简介", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "内容简介不能为空")
    @DiffLogField(name = "内容简介")
    private String content;

    @Schema(description = "公函内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "测试")
    @NotEmpty(message = "公函内容不能为空")
    private String remark;

    @Schema(description = "状态(草稿:0；审核中:1；审核通过:2；审核驳回:3)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "状态(草稿:0；审核中:1；审核通过:2；审核驳回:3)不能为空")
    private Integer status;

    @Schema(description = "附件子表数据", example = "测试")
    private List<BaseOfficialLetterFileDO> fileData;

    @Schema(description = "明细子表数据", example = "测试")
    private List<BaseOfficialLetterDetailDO> detailData;

}